#!/bin/sh

GRUB_MKCONFIG=$(which grub-mkconfig)

if [ -e /boot/grub/grub.cfg ]; then
    mv -n /boot/grub/grub.cfg /boot/grub/grub.cfg.old.$$ || exit 1
fi

$GRUB_MKCONFIG -o /boot/grub/grub.cfg $@
